package com.jiazhong.text;

import java.util.Scanner;

public class Test08 {
    public static void main(String[] args) {
       Scanner sc=new Scanner(System.in);
       String username,password;
       for (int i=1;i<=3;i++){
           System.out.println("输入用户名");
           username= sc.next();
           System.out.println("输入密码");
           password= sc.next();
           if (username.equals("admin")&&password.equals("123456")){
               System.out.println("登录成功");
               return;
           }
           else
               System.out.println("用户名或密码错误");
       }
        System.out.println("登录次数过多，请联系管理员");
    }
}
